// types/websocket.ts
export interface WebSocketConfig {
  url?: string;
  maxReconnectAttempts?: number;
  reconnectInterval?: number;
  onOpen?: () => void;
  onMessage?: (data: any) => void;
  onError?: (error: Event) => void;
  onClose?: (event: CloseEvent) => void;
}

export interface ApiResponse<T = any> {
  code: number;
  message: string;
  data: T;
}
